home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 146
/
(Vol 146) Jan 07 2012.iso
/
Games
/
thrust_2.swf
/
scripts
/
frame_21
/
PlaceObject2_107_537
/
CLIPACTIONRECORD onClipEvent(enterFrame)_2.as
next >
Wrap
Text File
|
2012-01-07
|
1KB
|
51 lines
onClipEvent(enterFrame){
if(_root.land.hitTest(_X,_Y,true) && dead == false)
{
dead = true;
momentumx = 0;
momentumy = 0;
this.gotoAndStop("Explode");
}
if(_root.land.spad.hitTest(_X,_Y + 7,true) && rotate > -10 && rotate < 10 && landed == false)
{
rotate = 0;
momentumx = 0;
if(landed == false)
{
momentumy = 0;
}
landed = true;
}
else if(_root.land.spad.hitTest(_X,_Y + 7,true) && rotate < -10 && rotate > 10 && landed == false)
{
dead = true;
momentumx = 0;
momentumy = 0;
this.gotoAndStop("Explode");
}
else if(!_root.land.spad.hitTest(_X,_Y + 7,true))
{
momentumy -= 0.02;
landed = false;
}
if(_root.land.pad.hitTest(_X,_Y + 10,true) && rotate > -10 && rotate < 10 && momentumx > -2 && momentumx < 2 && momentumy > -0.8 && dead == false)
{
rotate = 0;
momentumx = 0;
momentumy = 0;
won = true;
this.gotoAndStop(4);
}
else if(_root.land.pad.hitTest(_X,_Y + 5,true) && rotate < -10 && rotate > 10 && momentumy < -0.8 && dead == false)
{
dead = true;
momentumx = 0;
momentumy = 0;
this.gotoAndStop("Explode");
}
if(landed == true)
{
rotate = 0;
}
}